<html jwcid="@Border" pageHeader="Webbeans User Guide">

	<h3>Basic Principles</h3>
	
	<p>
	As was mentioned in the <a href="#" jwcid="@PageLink" page="Home">Overview</a>
	Webbeans provides to you the ability to easily view and edit JavaBeans.
	</p>

	<p>	
	Webbeans offers two components for that purposes, they are: <code>BeanEditor</code> and <code>XsltBeanEditor</code> components.
	</p>
	
	<p>
	The main difference between them is that while BeanEditor provides only default layout of JavaBean fields,
	XsltBeanEditor allows you to customize that layout using XSLT transformation. See correspondent demo pages
	for details (<a href="#" jwcid="@PageLink" page="BeanEditorDemo">BeanEditor Demo</a> and <a href="#" jwcid="@PageLink" page="XsltBeanEditorDemo">XsltBeanEditor Demo</a>).
	</p>
	
	<p>
	Despite their difference, the components usage is similiar: they require just <em>single line of code</em>
	to get HTML representation of JavaBean viewer/editor on your page. To get an editor for JavaBean fields contents
	you need to write the following:
	</p>
	<pre>
	&lt;span <b>jwcid="@BeanEditor"</b> <b>bean="ognl:javaBeanInstance"</b> /&gt;</pre>

	<p>
	Isn't that was simple? :) To get viewer for the JavaBean you need to specify <code>readOnly="true"</code> attribute:
	</p>
	<pre>
	&lt;span jwcid="@BeanEditor" bean="ognl:javaBeanInstance" <b>readOnly="true"</b> /&gt;</pre>
	
	<h3>Supported Type Mappings</h3>

	<p>
	First version of Webbeans provides editors/viewers the following types of JavaBean's fields:
	</p>
	<ul>
		<li><code>String</code></li>
		<li><code>java.math.BigDecimal</code></li>
		<li><code>java.util.Date</code></li>
		<li><code>int</code></li>
		<li><code>double</code></li>
		<li><code>boolean</code></li>
		<li><code>enum</code> including JAXB 2.0 enums (@XmlEnum) support</li>
		<li><code>java.util.List</code> parametrized with types listed above and other JavaBeans and Lists</li>
	</ul>

</html>